﻿<%@ Control Language="C#" EnableViewState="true" %>
<%@ Register Assembly="Antu.WebControls" Namespace="Antu.WebControls" TagPrefix="CBW" %>
<style type="text/css">
    #ctl00_MainerRegion_ZS_BCFAControl___GridList_Div1
    {
        border-collapse: collapse;
        border: 1px solid #74a4c0;
        background-color: #FFFFFF;
        text-align: center;
        color: #a30101;
    }
</style>

<script type="text/javascript">
    function selecall() {
        $(":checkbox").each(function() {
            $(this).attr("checked", !$(this).attr("checked"))
            if ($(this).parent().attr("title") != "") {
                if ($(this).attr("checked")) {
                    $("#<%=showagnum.ClientID %>").val($("#<%=showagnum.ClientID %>").val() + "," + $(this).attr("title"));
                } else {
                    $("#<%=showagnum.ClientID %>").val($("#<%=showagnum.ClientID %>").val().replace("," + $(this).attr("title"), ""));
                }
            }
        }
)
        
    }
    function selectline(v)
     {
        $(v).parent().parent().find(":checkbox").each(function() {
            $(this).attr("checked", !$(this).attr("checked"))
            if ($(this).parent().attr("title") != "") {
                if ($(this).attr("checked")) {
                    $("#<%=showagnum.ClientID %>").val($("#<%=showagnum.ClientID %>").val() + "," + $(this).attr("title"));
                } else {
                    $("#<%=showagnum.ClientID %>").val($("#<%=showagnum.ClientID %>").val().replace("," + $(this).attr("title"), ""));
                }
            }
        })
        if ($(v).attr("checked")) {
            $(v).attr("checked", false)
        } else {
            $(v).attr("checked", true)
        }
       
    }
    function selectthis(v) {
        if ($(v).attr("checked")) {
            $("#<%=showagnum.ClientID %>").val($("#<%=showagnum.ClientID %>").val() + "," + $(v).attr("title"));
            $("#<%=showfjnum.ClientID %>").val($("#<%=showfjnum.ClientID %>").val() + "," + $(v).attr("num"));
        } else {
        $("#<%=showagnum.ClientID %>").val($("#<%=showagnum.ClientID %>").val().replace("," + $(v).attr("title"), ""));

        $("#<%=showfjnum.ClientID %>").val($("#<%=showfjnum.ClientID %>").val().replace("," + $(v).attr("num"), ""));

        }
        
        
    }
    function showdg(id) {
        var pid = '<%=HttpContext.Current.Request["PID"] %>';
        var zid = '<%=HttpContext.Current.Request["zid"] %>';
        var query = '<%=HttpContext.Current.Request["query"] %>';
        var url = "EditRoom.aspx?query=" + query + "&pid=" + pid + "&id=" + id + "&zid=" + zid + "&r=" + Math.random();
        window.location.href(url);
    }
    window.onload = function aa() {
        var tt = '<%=HttpContext.Current.Request["query"] %>';
        var t1 = document.getElementById('<%=showop1.ClientID %>');
        if (tt == "cqzh" || tt == "xycx") { t1.style.display = "none"; }
    };
    function ckickdown() {
        var t1 = document.getElementById('<%=shipanle.ClientID %>');
        
        if (t1.style.display == "none") { t1.style.display = "block"; }
        else {t1.style.display = "none"; }
    }
    function displaytable() {
        var tt = document.getElementById('<%=showop1.ClientID %>');
        tt.style.display = "none";
    }

</script>

<table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-image: url(<%= Antu.Core.Components.SiteSettings.DefaultSiteSettings.DefaultThemeFolderMapPath %>images/menuthb.png);
    margin-top: 1px">
    <tr>
        <td valign="middle" height="30">
            <font id="Font1" style="font-size: 14px; font-weight: bold; color: #3E7CC3; float: left;
                color: black; text-indent: 1em;" runat="server">楼层信息 </font>
        </td>
    </tr>
</table>
<table class="window_tab_list" width="98%" border="0" cellpadding="0" cellspacing="0"
    align="center" style="margin: 0px auto">
    <tr>
        <th colspan="2" style="height: 30px">
            楼盘展示<%--<input id="CheckBoxall" type="checkbox" onclick="selecall()"  />反选--%>
        </th>
    </tr>
</table>
<table class="window_tab_list" border="0" cellpadding="0" cellspacing="0" align="center"
    style="margin: 0px auto; margin-top: 5px; text-align: center; width: 98%">
    <asp:Repeater ID="FlourPre" runat="server">
        <ItemTemplate>
            <tr>
                <td width="50px">
                    <input id="CheckBoxline" type="checkbox" onclick="selectline(this)" title='单选一层' />
                    <asp:Label ID="flourid" runat="server" Text='<%#Eval("楼层号") %>'></asp:Label>
                </td>
                <asp:Repeater ID="RoomPre" runat="server">
                    <ItemTemplate>
                       <td>
                            <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                            <asp:Literal ID="Literal2" runat="server" Visible="false" Text='<%#Eval("房屋类型")  %>'></asp:Literal>
                            <input id="floorCheckBox" type="checkbox"  style='display: <%#Eval("STATUS").ToString()=="1"?"":"none" %>' visible='<%#Eval("STATUS").ToString()=="1" %>'
                                onclick="selectthis(this)" title='<%#Eval("楼层房间号") %>' num='<%#Eval("id") %>' />
                            <span>&nbsp; <a style="display: <%#Eval("STATUS").ToString()=="1"?"":"none" %>" href="#"
                                onclick="showdg('<%#Eval("id") %>')">
                                <asp:Literal ID="Literal7" runat="server"></asp:Literal>
                                <%#Eval("楼层房间号") %></a><asp:Literal ID="Literal3" runat="server"></asp:Literal>
                                <asp:Literal ID="Literal4" runat="server" Visible="false" Text='<%#Eval("业务状态")  %>'></asp:Literal>
                                <asp:Literal ID="Literal5" runat="server"></asp:Literal>
                                <asp:Literal ID="Literal6" runat="server" Text='<%#Eval("楼层房间号") %>' Visible="false"></asp:Literal>
                            </span>
                        </td>
                    </ItemTemplate>
                </asp:Repeater>
            </tr>
        </ItemTemplate>
    </asp:Repeater>
</table>
<div style="padding-left: 10px; widows: 100%;">
    <span style='background-color: Red;'>&nbsp;&nbsp;</span> <span style="font-size: 12px;">
        安置房源面积小于被征收面积</span></div>
<asp:Label ID="showmsg" runat="server"></asp:Label>
<table width="100%" border="0">
    <tr>
        <td valign="top">
            <table cellpadding="0" cellspacing="0" align="center" id="showop1" runat="server"
                border="0" style="margin: 0px auto; width: 50%; border: #98c9ef 1px dashed; border-collapse: collapse;
                text-align: center;" class="window_tab_list">
                <tr>
                    <th colspan="2" style="height: 30px">
                        生成楼层信息
                    </th>
                </tr>
                <tr>
                    <td width="100px" rowspan="2">
                        楼层数
                    </td>
                    <td align="left">
                        <span style="float: left; margin-left: 5px">最低层：
                            <asp:TextBox ID="floorcountmin" runat="server" Text="1"></asp:TextBox></span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <span style="float: left; margin-left: 5px">最高层：
                            <asp:TextBox ID="floorcountmax" runat="server"></asp:TextBox></span>
                    </td>
                </tr>
                <tr>
                    <td width="100px">
                        每层房间数
                    </td>
                    <td>
                        <asp:TextBox ID="floornums" runat="server" Style="float: left; margin-left: 5px"></asp:TextBox>
                        <input id="selectedshi" type="button" value="输入室号" class="button" onclick="ckickdown()" />
                        <%--<input id="selectedshi" type="checkbox" value="室号" onclick="ckickdown()" title="输入室号" />--%>
                    </td>
                </tr>
                <tr id="shipanle" style="display: none;">
                    <td width="100">
                        室号
                    </td>
                    <td>
                        <asp:TextBox ID="shihao" runat="server" Style="float: left; margin-left: 5px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <asp:Button ID="createfloor" runat="server" Text="生 成" />
                        <asp:Button ID="clear" runat="server" Text="全删" />
                        <input type="button" id="add" name="add" value="返 回" onclick="window.location.href='ProjectZhuang.aspx?query=loupan&pid=<%=HttpContext.Current.Request["PID"] %>'" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="text-align: left; font-size: 12px;">
                        &nbsp;&nbsp;1，当只生成一层时，最底层与最高层填写数据一样。<br />
                        &nbsp;&nbsp;2，室号当生成为不以01房间号开始的情况下使用。<br />
                        <font color="red">&nbsp;&nbsp;3，房间号须从低开始生成，需要用生成与删除配合。</font>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<table cellpadding="0" cellspacing="0" align="center" id="Table1" runat="server"
    border="0" style="margin: 5px auto; width: 50%; border: #98c9ef 1px dashed; border-collapse: collapse;
    text-align: center;" class="window_tab_list">
    <tr>
        <th colspan="2">
            批量设置
        </th>
    </tr>
    <tr>
        <td style="text-align: right">
            房屋类型&nbsp;&nbsp;
        </td>
        <td style="text-align: left">&nbsp;&nbsp;
            <asp:DropDownList ID="房屋类型" runat="server">
                <%--<asp:ListItem Text="公租房"></asp:ListItem>
                <asp:ListItem Text="限价房"></asp:ListItem>
                <asp:ListItem Text="廉租房"></asp:ListItem>
                <asp:ListItem Text="产权调换房"></asp:ListItem>
                <asp:ListItem Text="经适房"></asp:ListItem>
                <asp:ListItem Text="其它房源"></asp:ListItem>--%>
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td style="text-align: right">
            户型：&nbsp;&nbsp;
        </td>
        <td style="text-align: left">&nbsp;&nbsp;
            <asp:DropDownList ID="房型" runat="server">
              <%--  <asp:ListItem Text="一室一厅"></asp:ListItem>
                <asp:ListItem Text="两室一厅"></asp:ListItem>
                <asp:ListItem Text="三室一厅"></asp:ListItem>
                <asp:ListItem Text="四室一厅"></asp:ListItem>--%>
            </asp:DropDownList>
        </td>
    </tr>
    <tr>
        <td style="text-align: right">
            建筑面积：&nbsp;&nbsp;
        </td>
        <td style="text-align: left">&nbsp;&nbsp;
            <asp:TextBox ID="建筑面积" runat="server"></asp:TextBox>平方米
        </td>
    </tr>
    <tr style="height: 30px;">
        <td colspan="2">
            <input id="Button1" type="button" value="反选" class="button" onclick="selecall()" />
            <asp:Button ID="BtnSet" runat="server" Text="设置" />&nbsp;&nbsp;
            <asp:Button  ID="btnDelAll" runat="server" Text="删除"/>
            <asp:Button ID="BtnCancel" runat="server" Text="返回" />
            <asp:Button ID="BtnQSXY" runat="server" Text="签署协议" />
        </td>
    </tr>
</table>
<asp:TextBox ID="showagnum" runat="server" TextMode="MultiLine" Style="display: none"></asp:TextBox>
<asp:TextBox ID="showfjnum" runat="server" TextMode="MultiLine" Style="display: none"></asp:TextBox>
